<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
use Illuminate\Routing\Router;

Route::get('test','\App\Http\Controllers\TestController@index')->middleware('checkage:lisheng');


Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace')
], function (Router $router) {


	$router->get('role','RoleController@index');
	$router->post('role','RoleController@postRole');
	$router->get('roles','RoleController@getRoleList');
	$router->get('users','UserController@getUserList');
	$router->get('user','UserController@index');
	$router->post('user','UserController@postUser');


	$router->get('permissions','PermissionController@index');
	$router->post('permissions','PermissionController@postPermission');
	$router->get('permissions/create','PermissionController@create');


	$router->get('users','UserController@index');
	$router->get('users/create','UserController@create');

	$router->get('users/groups','UserGroupController@index');
	$router->get('usergroups/create','UserGroupController@create');
});


// Auth::routes();
